-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hashcode changing between different executions (#2478) #2479
Conversation
Another fix would be making the hashcode variable transient. |
Well if you open a PR to fix a bug it woild be really nice if you could explain in depth why the issue occurred in the first place ;) |
i think the real issue here is that it's relying on the hashCode being stable, which is not a safe assumption |
All the details are in the linked issue.
I mean we could just put a transient on the cached variable, that would solve the problem without assuming that they maintain the same hashcode |
The linked issue does not describe where the problem originates from. It only generically describes an issue with serialising/deserializing packet containers... |
To add more context, you serialize a packetContainer and when trying to deserialize it protocol lib does what I've describeded above and it fails. |
I think using |
right, so in my mind a proper fix addresses the fact that serialization relies on hashCode instead of something stable |
okay, I'm gonna try to add the modifier transient to the hashcode cache variable, that should fix the problem without --- edit |
Fixes the issue that was preventing the deserialization of PacketContainers
closes #2478